According to Bill Purdy who teaches about Federal Income Tax at Lincoln Law School, these 1099s are often wrong in stating there is a taxable event as a result of foreclosure. When a non-recourse debt is foreclosed in California no cancellation of debt income occurs. If there is no personal liability on the loan, there can be no improvement to the borrower's balance sheet when the collateral is foreclosed.
Non-recourse debt might be statutorily non-recourse, as the purchase money non-recourse provisions of California law; it may be non-recourse by reason of a bankruptcy; or it may be non-recourse because the collateral was acquired subject to the lien.
Bottom line - if you receive one of these 1099s see a knowledgeable attorney before assuming you'll have a large tax bill to pay.